package com.jumi.microservice.dto.reponse;


import com.jumi.microservice.enums.CheckStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@ApiModel("实名认证返回结果")
public class RealNameReponse extends BaseUserReponse {
    @ApiModelProperty("记录id")
    private Integer id;
    @ApiModelProperty("用户id")
    private Integer uid;
    @ApiModelProperty("身份证号码")
    private String idcard;
    @ApiModelProperty("身份证正面")
    private String cardJust;
    @ApiModelProperty("身份证反面")
    private String cardBack;

    @ApiModelProperty("审核人id")
    private Long adminId;

    @ApiModelProperty("审核人姓名")
    private String adminName;

    @ApiModelProperty("审核日期")
    private LocalDateTime examineTime;

    @ApiModelProperty("审核状态")
    private CheckStatus status;

    @ApiModelProperty("审核结果")
    private String remark;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("支付宝账号")
    private String aliCode;

    @ApiModelProperty("银行卡号")
    private String bankCard;

    public String getAliCode() {
        return aliCode;
    }

    public void setAliCode(String aliCode) {
        this.aliCode = aliCode;
    }

    public String getBankCard() {
        return bankCard;
    }

    public void setBankCard(String bankCard) {
        this.bankCard = bankCard;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }


    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        if (this.status.getValue() == 0)
            this.adminId = 0L;
        else
            this.adminId = adminId;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        if (this.status.getValue() == 0)
            this.adminName = "";
        else
            this.adminName = adminName;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public String getCardJust() {
        return cardJust;
    }

    public void setCardJust(String cardJust) {
        this.cardJust = cardJust;
    }

    public String getCardBack() {
        return cardBack;
    }

    public void setCardBack(String cardBack) {
        this.cardBack = cardBack;
    }

    public CheckStatus getStatus() {
        return status;
    }

    public void setStatus(CheckStatus status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        if (this.status.getValue() == 0)
            this.remark = "";
        else
            this.remark = remark;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }


    public LocalDateTime getExamineTime() {
        return examineTime;
    }

    public void setExamineTime(LocalDateTime examineTime) {

        if (this.status.getValue() == 0)
            this.examineTime = null;
        else
            this.examineTime = examineTime;
    }
}
